package jsyf.oa.entity.wechartSec;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by 92852 on 2018/4/17.
 */
@Entity
@Table(name = "T_SEC_USER", schema = "oa", catalog = "")
public class WechartUserEntity extends BaseEntity{
    private String name;
    private String tel;
    private String wxId;
    private String wxAvatarUrl;
    private String wxNick;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getWxId() {
        return wxId;
    }

    public void setWxId(String wxId) {
        this.wxId = wxId;
    }

    public String getWxAvatarUrl() {
        return wxAvatarUrl;
    }

    public void setWxAvatarUrl(String wxAvatarUrl) {
        this.wxAvatarUrl = wxAvatarUrl;
    }

    public String getWxNick() {
        return wxNick;
    }

    public void setWxNick(String wxNick) {
        this.wxNick = wxNick;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("NAME", this.getName());
        obj.put("TEL", this.getTel());
        obj.put("WX_ID", this.getWxId());
        obj.put("WX_AVATAR_URL", this.getWxAvatarUrl());
        obj.put("WX_NICK", this.getWxNick());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SEC_USER";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("NAME", "name");
        obj.put("TEL", "tel");
        obj.put("WX_ID", "wxId");
        obj.put("WX_AVATAR_URL", "wxAvatarUel");
        obj.put("WX_NICK", "wxNick");
        return obj;
    }
}
